/**
 * 
 */
package ${basepackage}.model.vo.op.opuser;

import java.util.List;

import javax.validation.GroupSequence;
import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import com.excalibur.core.model.BaseObject;

import ${basepackage}.model.vo.validation.IConstraintGroup;
import ${basepackage}.model.vo.validation.INotNullGroup;

/**
 * @author "Jiance Qin"
 * 
 * @date 2014年3月10日
 * 
 * @time 下午4:45:29
 * 
 * @desc
 * 
 */
@GroupSequence(value = { INotNullGroup.class, IConstraintGroup.class,
		AddOpUserForm.class })
public class AddOpUserForm extends BaseObject {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5275539481794221767L;

	@NotBlank(message = "{webapp.validation.AddOpUserForm.username.NotNull}", groups = INotNullGroup.class)
	@Pattern(message = "{webapp.validation.AddOpUserForm.username.Pattern}", regexp = "^\\s*[a-zA-Z_]\\w{1,50}\\s*$", groups = IConstraintGroup.class)
	private String username;

	@NotBlank(message = "{webapp.validation.AddOpUserForm.email.NotBlank}", groups = INotNullGroup.class)
	@Pattern(message = "{webapp.validation.AddOpUserForm.email.Pattern}", regexp = "^\\s*\\w+([.+-]\\w+)*@\\w+([.-]\\w+)*\\.\\w+([.-]\\w+)*\\s*$", groups = IConstraintGroup.class)
	private String email;

	@NotBlank(message = "{webapp.validation.AddOpUserForm.tel.NotBlank}", groups = INotNullGroup.class)
	private String tel;

	@NotBlank(message = "{webapp.validation.AddOpUserForm.realName.NotBlank}", groups = INotNullGroup.class)
	@Length(message = "{webapp.validation.AddOpUserForm.realName.Length}", min = 2, max = 50, groups = IConstraintGroup.class)
	private String realName;

	@NotBlank(message = "{webapp.validation.AddOpUserForm.accountDisabled.NotBlank}", groups = INotNullGroup.class)
	private String accountDisabled;

	@NotBlank(message = "{webapp.validation.AddOpUserForm.accountExpired.NotBlank}", groups = INotNullGroup.class)
	private String accountExpired;

	@NotBlank(message = "{webapp.validation.AddOpUserForm.accountLocked.NotBlank}", groups = INotNullGroup.class)
	private String accountLocked;

	@NotBlank(message = "{webapp.validation.AddOpUserForm.credentialsExpired.NotBlank}", groups = INotNullGroup.class)
	private String credentialsExpired;

	private List<Long> roleIds;

	/**
	 * 
	 */
	public AddOpUserForm() {

	}

	/**
	 * @return the roleIds
	 */
	public List<Long> getRoleIds() {
		return roleIds;
	}

	/**
	 * @param roleIds
	 *            the roleIds to set
	 */
	public void setRoleIds(List<Long> roleIds) {
		this.roleIds = roleIds;
	}

	/**
	 * @return the username
	 */
	public String getUsername() {
		return username;
	}

	/**
	 * @param username
	 *            the username to set
	 */
	public void setUsername(String username) {
		this.username = username;
	}

	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email
	 *            the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @return the tel
	 */
	public String getTel() {
		return tel;
	}

	/**
	 * @param tel
	 *            the tel to set
	 */
	public void setTel(String tel) {
		this.tel = tel;
	}

	/**
	 * @return the realName
	 */
	public String getRealName() {
		return realName;
	}

	/**
	 * @param realName
	 *            the realName to set
	 */
	public void setRealName(String realName) {
		this.realName = realName;
	}

	/**
	 * @return the accountDisabled
	 */
	public String getAccountDisabled() {
		return accountDisabled;
	}

	/**
	 * @param accountDisabled
	 *            the accountDisabled to set
	 */
	public void setAccountDisabled(String accountDisabled) {
		this.accountDisabled = accountDisabled;
	}

	/**
	 * @return the accountExpired
	 */
	public String getAccountExpired() {
		return accountExpired;
	}

	/**
	 * @param accountExpired
	 *            the accountExpired to set
	 */
	public void setAccountExpired(String accountExpired) {
		this.accountExpired = accountExpired;
	}

	/**
	 * @return the accountLocked
	 */
	public String getAccountLocked() {
		return accountLocked;
	}

	/**
	 * @param accountLocked
	 *            the accountLocked to set
	 */
	public void setAccountLocked(String accountLocked) {
		this.accountLocked = accountLocked;
	}

	/**
	 * @return the credentialsExpired
	 */
	public String getCredentialsExpired() {
		return credentialsExpired;
	}

	/**
	 * @param credentialsExpired
	 *            the credentialsExpired to set
	 */
	public void setCredentialsExpired(String credentialsExpired) {
		this.credentialsExpired = credentialsExpired;
	}

	/**
	 * @return the serialversionuid
	 */
	public static long getSerialversionuid() {
		return serialVersionUID;
	}

}
